package no.hib.quiz;

public class Quiz {
	
	private QuestionAndAnswer[] QandAArr;
	private String name;
	private int counter;
	
	public Quiz() {
		QandAArr = new QuestionAndAnswer[10];
		counter = 0;
	}

	public QuestionAndAnswer[] getQandAArr() {
		return QandAArr;
	}
	
	public boolean add(QuestionAndAnswer QandA) {
		if (counter > -1 && counter < 10) {
			QandAArr[counter] = QandA;
			counter++;
			return true;
		}
		else {
			return false;
		}
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

}
